package com.leyou.item.client;

import com.leyou.common.utils.PageResult;
import com.leyou.item.pojo.Brand;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author bystander
 * @date 2018/9/22
 */
@RequestMapping("brand")
public interface BrandApi {

    @GetMapping("page")
    PageResult<Brand> queryBrandByPage();

    @PostMapping("add")
    void saveBrand(Brand brand, @RequestParam("cids")List<Long> cids);

    @GetMapping("bid/{bid}")
    Brand queryBrandByBid(@PathVariable("bid")Long bid);

    @GetMapping("name/{bid}")
    String queryBrandNameByBid(@PathVariable("bid")Long bid);

    @GetMapping("cid/{cid}")
    List<Brand> queryBrandByCid(@PathVariable("cid")Long cid);

    @PutMapping("update")
    void updateBrand(Brand brand);

    @PostMapping("delete/{bid}")
    void updateBrand(@PathVariable("bid") Long bid);

    @GetMapping("list")
    List<Brand> queryBrandByIds(@RequestParam("ids")List<Long> ids);
}
